package com.dctp.common.vo;

import com.dctp.common.utils.DateUtil;

import java.io.Serializable;
import java.math.BigDecimal;

public class MarketTicker implements Serializable {
    private String name;              // 合约名称，比如 COMEX黄金
    private String symbol;            // 合约代码，比如 GC00Y 或 BTCUSDT
    private BigDecimal lastPrice = BigDecimal.ZERO;     // 最新成交价，币安 c，东方财富 p
    private BigDecimal openPrice = BigDecimal.ZERO;     // 今日开盘价，币安 o，东方财富 o
    private BigDecimal highPrice = BigDecimal.ZERO;     // 今日最高价，币安 h，东方财富 h
    private BigDecimal lowPrice = BigDecimal.ZERO;      // 今日最低价，币安 l，东方财富 l
    private BigDecimal prevClosePrice = BigDecimal.ZERO;// 昨收价，币安 x，东方财富 zjsj
    private BigDecimal priceChange = BigDecimal.ZERO;   // 涨跌额，币安 p - x，东方财富 zde
    private BigDecimal priceChangePercent = BigDecimal.ZERO; // 涨跌幅%，币安 P，东方财富 zdf
    private BigDecimal volume = BigDecimal.ZERO;        // 成交量，币安 v，东方财富 vol
    private BigDecimal quoteVolume = BigDecimal.ZERO;   // 成交额，币安 q，东方财富 cje
    private BigDecimal bidPrice = BigDecimal.ZERO;      // 买入价，币安 b，东方财富 mrj
    private BigDecimal bidQty = BigDecimal.ZERO;        // 买入量，币安 B，东方财富 mrl
    private BigDecimal askPrice = BigDecimal.ZERO;      // 卖出价，币安 a，东方财富 mcj
    private BigDecimal askQty = BigDecimal.ZERO;        // 卖出量，币安 A，东方财富 mcl
    private long updateTime = DateUtil.currentTimestamp();          // 更新时间，币安 E，东方财富 utime（秒或毫秒注意区分）

    // getter/setter 省略

    @Override
    public String toString() {
        return "MarketTicker{" +
                "name='" + name + '\'' +
                ", symbol='" + symbol + '\'' +
                ", lastPrice=" + lastPrice +
                ", openPrice=" + openPrice +
                ", highPrice=" + highPrice +
                ", lowPrice=" + lowPrice +
                ", prevClosePrice=" + prevClosePrice +
                ", priceChange=" + priceChange +
                ", priceChangePercent=" + priceChangePercent +
                ", volume=" + volume +
                ", quoteVolume=" + quoteVolume +
                ", bidPrice=" + bidPrice +
                ", bidQty=" + bidQty +
                ", askPrice=" + askPrice +
                ", askQty=" + askQty +
                ", updateTime=" + updateTime +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSymbol() {
        return symbol;
    }

    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    public BigDecimal getLastPrice() {
        return lastPrice;
    }

    public void setLastPrice(BigDecimal lastPrice) {
        this.lastPrice = lastPrice;
    }

    public BigDecimal getOpenPrice() {
        return openPrice;
    }

    public void setOpenPrice(BigDecimal openPrice) {
        this.openPrice = openPrice;
    }

    public BigDecimal getHighPrice() {
        return highPrice;
    }

    public void setHighPrice(BigDecimal highPrice) {
        this.highPrice = highPrice;
    }

    public BigDecimal getLowPrice() {
        return lowPrice;
    }

    public void setLowPrice(BigDecimal lowPrice) {
        this.lowPrice = lowPrice;
    }

    public BigDecimal getPrevClosePrice() {
        return prevClosePrice;
    }

    public void setPrevClosePrice(BigDecimal prevClosePrice) {
        this.prevClosePrice = prevClosePrice;
    }

    public BigDecimal getPriceChange() {
        return priceChange;
    }

    public void setPriceChange(BigDecimal priceChange) {
        this.priceChange = priceChange;
    }

    public BigDecimal getPriceChangePercent() {
        return priceChangePercent;
    }

    public void setPriceChangePercent(BigDecimal priceChangePercent) {
        this.priceChangePercent = priceChangePercent;
    }

    public BigDecimal getVolume() {
        return volume;
    }

    public void setVolume(BigDecimal volume) {
        this.volume = volume;
    }

    public BigDecimal getQuoteVolume() {
        return quoteVolume;
    }

    public void setQuoteVolume(BigDecimal quoteVolume) {
        this.quoteVolume = quoteVolume;
    }

    public BigDecimal getBidPrice() {
        return bidPrice;
    }

    public void setBidPrice(BigDecimal bidPrice) {
        this.bidPrice = bidPrice;
    }

    public BigDecimal getBidQty() {
        return bidQty;
    }

    public void setBidQty(BigDecimal bidQty) {
        this.bidQty = bidQty;
    }

    public BigDecimal getAskPrice() {
        return askPrice;
    }

    public void setAskPrice(BigDecimal askPrice) {
        this.askPrice = askPrice;
    }

    public BigDecimal getAskQty() {
        return askQty;
    }

    public void setAskQty(BigDecimal askQty) {
        this.askQty = askQty;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }
}
